package com.rerun.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.rerun.entity.Job;
import com.rerun.entity.vo.JobDetailVo;
import com.rerun.entity.vo.JobMessageVo;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * The interface Job mapper.
 * 职位接口
 *
 * @author Administrator
 */
public interface JobMapper extends BaseMapper<Job> {
    /**
     * Find page by intention list.
     *
     * @param pagination the pagination
     * @param memberId   the member id
     * @return the list
     */
    List<Job> findPageByIntention (Pagination pagination,String memberId);

    /**
     * Find new jobs list.
     *
     * @param pagination the pagination
     * @return the list
     */
    List<Job> findNewJobs (Pagination pagination );

    /**
     * Find page by work district list.
     *
     * @param pagination   the pagination
     * @param workCity     the work city
     * @param workDistrict the work district
     * @param keyWord      the key word
     * @param edu          the edu
     * @param salaryRange  the salary range
     * @param workYears    the work years
     * @return the list
     */
    List<Job> findPageByWorkDistrict(Pagination pagination, @Param("workCity") String workCity, @Param("workDistrict") String workDistrict, @Param("keyWord") String keyWord, @Param("edu") String edu, @Param("salaryRange") String salaryRange, @Param("workYears") String workYears);

    /**
     * Job detail job detail vo.
     *
     * @param id the id
     * @return the job detail vo
     */
    JobDetailVo jobDetail(@Param("id") String id);

    /**
     * Job details list.
     *
     * @param ids the ids
     * @return the list
     */
    List<JobDetailVo> jobDetails(@Param("ids") List<String> ids);

    /**
     * Gets job details by id.
     *
     * @param jobId the job id
     * @return the job details by id
     */
    JobDetailVo getJobDetailById(String jobId);

    /**
     * 根据id获取正在招聘的工作. 可用的
     *
     * @param jobId the job id
     * @return the job
     */
    Job findAvailableJobById(@Param("jobId")String jobId);

    /**
     * 获取幼儿园下正在招聘的职位.
     *
     * @param parkId the park id
     * @return the job
     * @see com.rerun.phone.memberuser.ParkController#getParkInfoById(String)
     */
    List<Job> findAvailableJobByParkId(@Param("parkId")String parkId);

    /**
     * 后台职位管理列表
     *
     * @param map the map
     * @return the list
     */
    List <JobMessageVo> showjobMessage(@Param("map") Map<String, Object > map);

    /**
     * 编辑回显
     *
     * @param id the id
     * @return the job message vo
     */
    JobMessageVo findjobMessage(@Param("id")String id);
}
